package com.mybatis.dao;

import java.util.Map;

public class GuidepostSqlProvider {
	
    public String updateStep(Map<String, Integer> map){
    	int step = map.get("step");
    	int num = map.get("num");
		String sql = "update guidepost set step=" + step + " where num =" + num;
		return sql;
    }
    
    public String updateSlamPoint(Map<String, Integer> map){
    	int num = map.get("num");
    	int mapX = map.get("mapX");
    	int mapY = map.get("mapY");
		String sql = "update guidepost set mapX=" + mapX + ",mapY=" + mapY + " where num =" + num;
		return sql;    	
    }
    
    public String insertSlamPoint(Map<String, Integer> map) {
    	int num = map.get("num");
    	int mapX = map.get("mapX");
    	int mapY = map.get("mapY");
    	String sql = "insert into guidepost(num,mapX,mapY,type,step,nextStep,xzdNumItem)" + " values (" + num  + ",'" + mapX + "','"
				+ mapY + "',0,0,0,0)";
    	return sql;
    }
    
}
